package vip.specimen.system.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import vip.specimen.system.datasource.entity.SystemUserEntity;

import java.util.UUID;

/**
 * *@Author: 余浪人
 * *@Date：2021/2/22 16:51
 * *@Email:yulangren520@Gmail.com
 * *@QQ:1368419640
 **/
@Repository
public interface SystemUserRepository extends JpaRepository<SystemUserEntity, UUID>{
    SystemUserEntity findByUsername(String userName);

    SystemUserEntity findByPhone(String phone);

    SystemUserEntity findByEmail(String email);

    SystemUserEntity findByUuid(UUID uuid);

    Page<SystemUserEntity> findSystemUserEntityByUsernameContainingOrderByCreateTimeDesc(String username, Pageable pageable);
}
